class stack{
	private String[] str = new String[20];
	private int i=0;

	public stack(){
		for(int j=0;j<20;j++) str[j] = "";
	}

	public void push(int x){
		if(i>19) return;
		str[i++] = x+"";
	}
	public void push(String c){
		if(i>19) return;
		str[i++] = c;
	}
	public String pop(){
		if(i<=0) return "";
		String s = str[--i];
		this.str[i] = "";
		return s;
	}
	public void clear(){
		for(int j=0;j<20;j++) str[j]="";
		i=0;
	}
	public void printStack(){
		for(int j=0;j<20;j++) if(str[j]!="")System.out.print(str[j]+",");
			System.out.println("");
	}
}

